<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/page/share/taglib.jsp" %>
<html>
<head>
<title>修改密码</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="/css/vip.css" type="text/css">
<script language="JavaScript" src="/js/FoshanRen.js"></script>
<script language="JavaScript">

function validateField(fieldvalue,message,msgId){
	var msg=document.getElementById(msgId);
	if(trim(fieldvalue)==""){
		msg.innerHTML=message;
		return false;
	}else{
		msg.innerHTML="";
		return true;
	}
}


function checkfm(){
	var field=document.getElementById("pass");
	if(!validateField(field.value,"原密码不能为空","pass_info"))return false;
	field=document.getElementById("realname");
	if(!validateField(field.value,"新密码不能为空","realname_info"))return false;
	var pass=field.value;
	field=document.getElementById("pass2");
	if(!validateField(field.value,"确认密码不能为空","pass2_info"))return false;
	if(pass!=field.value){
		document.getElementById("pass2_info").innerHTML="新密码和确认密码不相同";
		return false;
	}
	return true;
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<s:form action="employee_editPass.html" method="post" onsubmit="return checkfm()">
  <table width="98%" height="35" border="0" align="center"
  	style="margin-top: 6px;margin-bottom: 10px;">
  	<tr style="background-color: #9CDCF9;"><td class="STYLE1">
  		&nbsp;&nbsp;&nbsp;&nbsp;你现在的位置是： &nbsp;我的账户&nbsp; &gt;&gt; &nbsp;修改密码</td>
  	</tr>
  	</table>
  <table width="98%" border="0" align="center">
    <tr bgcolor="f5f5f5"> 
      <td width="25%" > </td>
      <td width="75%">
        <font color="#FF0000"><s:fielderror/></font>
      </td>
    </tr>
    <tr bgcolor="f5f5f5"> 
      <td width="25%" > <div align="right">登录账号：</div></td>
      <td width="75%"> 
      	<input type="text" size="32" maxlength="32" disabled="disabled" value="${username}"/>
      </td>
    </tr>
    <tr bgcolor="f5f5f5"> 
      <td> <div align="right">原密码：</div></td>
      <td> <s:password id="pass" name="employee.password" size="32" maxlength="32"
      		onblur="validateField(this.value,'原密码不能为空','pass_info')"/>
        <font color="#FF0000">* <span id="pass_info"></span></font></td>
    </tr>
     <tr bgcolor="f5f5f5"> 
      <td> <div align="right">新密码：</div></td>
      <td> <s:password id="realname" name="employee.realname" size="32" maxlength="32"
      		onblur="validateField(this.value,'新密码不能为空','realname_info')"/>
        <font color="#FF0000">* <span id="realname_info"></span></font></td>
    </tr>
    <tr bgcolor="f5f5f5"> 
      <td> <div align="right">确认密码：</div></td>
      <td> <input type="password" id="pass2" size="32" maxlength="32"
      		onblur="validateField(this.value,'确认密码不能为空','pass2_info')"/>
        <font color="#FF0000">* <span id="pass2_info"></span></font></td>
    </tr>
    <tr bgcolor="f5f5f5"> 
      <td width="25%" > </td> 
      <td width="75%">
      	  <s:token/><br/>
          <input type="submit" value=" 确 定 " class="frm_btn">&nbsp;&nbsp;
      </td>
    </tr>
  </table>
</s:form>
</body>
</html>